package main

import (
	"fmt"
	"gitee.com/stevenzack/fakenews/module"
	"net/http"
)

func main() {
	http.HandleFunc("/user/get", module.Http_userGet)
	http.HandleFunc("/user/login", module.Http_userLogin)
	http.HandleFunc("/user/register", module.Http_userRegister)
	http.HandleFunc("/user/changepassword", module.Http_userChangePassword)
	http.Handle("/res/", http.StripPrefix("/res/", http.FileServer(http.Dir("res"))))
	e := http.ListenAndServe(":8080", nil)
	if e != nil {
		fmt.Println("http() failed:", e)
		return
	}
}
